
var authenticationModule = angular.module('authenticationModule', ['ngCookies']);


 
 var authInfo2 = {};
 
function saveAuthInfo($cookies) { 
	 $cookies.auth = authInfo;
};
 
function loadAuthInfo($cookies, $scope) {
	$scope.authInfo2 = $cookies.auth;
};
 	
 	authenticationModule.controller('TAuthController', ['$cookies', '$scope', function($cookies, $scope) {
	var authInfo = {user : 'Usuario', role : 'visitor'};	
	 $cookies.auth = authInfo;
	 $scope.authInfo2 = $cookies.auth;
}]);

//$cookies.auth = authInfo;
	 //$scope.authInfo2 = $cookies.auth;